package com.fc.advbox.service;

import com.fc.advbox.entity.ContractEntity;
import com.fc.advbox.entity.EquipmentHoldingEntity;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * IInvestorAcctService
 *
 * @author E7450
 * @date 2018/7/01 20:53:36
 */
public interface IEquipmentHoldingService extends BaseService<EquipmentHoldingEntity>{

    EquipmentHoldingEntity queryByEquipmentId(Long equipmentId);

    /**
     * @param params : currentTime,
     * @param params : equipmentId, ownerOrgId, agentOrgId, channelOrgId, rentOrgId, offset, limit. 所有参数为可选
     * @return
     */
    List<EquipmentHoldingEntity> queryAllCurrentActiveRentHoldings(Map<String, Object> params);
    /**
     * 当确认合同并开始执行合同时，需要先计算每天，每台设备对于代理商，渠道商从广告商的收益比率
     * @param contractEntity
     */
    void confirmContractToUpdateEquipmentRate(ContractEntity contractEntity);

    void terminateEquipmentRateCalculation(ContractEntity contractEntity);

}
